package com.yy.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class OcrResult {

    @JsonProperty("stateCode")
    private String stateCode;
    @JsonProperty("message")
    private String message;
    @JsonProperty("data")
    private DataDTO data;

    @NoArgsConstructor
    @Data
    public static class DataDTO {
        @JsonProperty("objs")
        private List<ObjsDTO> objs;
        @JsonProperty("status")
        private String status;

        @NoArgsConstructor
        @Data
        public static class ObjsDTO {
            @JsonProperty("url")
            private String url;
            @JsonProperty("result")
            private ResultDTO result;

            @NoArgsConstructor
            @Data
            public static class ResultDTO {
                @JsonProperty("purchaserBank")
                private String purchaserBank;
                @JsonProperty("amountInWords")
                private String amountInWords;
                @JsonProperty("amount")
                private String amount;
                @JsonProperty("invoiceName")
                private String invoiceName;
                @JsonProperty("sellerBank")
                private String sellerBank;
                @JsonProperty("sellerName")
                private String sellerName;
                @JsonProperty("sellerRegisterNum")
                private String sellerRegisterNum;
                @JsonProperty("sellerAddress")
                private String sellerAddress;
                @JsonProperty("tax")
                private String tax;
                @JsonProperty("invoiceDate")
                private String invoiceDate;
                @JsonProperty("invoiceNum")
                private String invoiceNum;
                @JsonProperty("invoiceCode")
                private String invoiceCode;
                @JsonProperty("purchaserAddress")
                private String purchaserAddress;
                @JsonProperty("purchaserName")
                private String purchaserName;
                @JsonProperty("goodsInfor")
                private String goodsInfor;
                @JsonProperty("taxRate")
                private String taxRate;
                @JsonProperty("totalAmount")
                private String totalAmount;
                @JsonProperty("purchaserRegisterNum")
                private String purchaserRegisterNum;
            }
        }
    }
}
